{% extends 'activity/activity-form-layout.html.twig' %}

{% do script([cloud_sdk_url('uploader'), 'app/js/activity-manage/audio/index.js']) %}
{% block activity_content %}
  {% set mediaType = activity.mediaType|default('audio') %}
  {% set fileType = 'audio' %}
  <div class="form-group">
    <div class="col-sm-2 control-label">
      <label for="ext_mediaId" class="control-label-required">{{ 'course.plan_task.activity_manage.audio'|trans }}</label>
    </div>
    <div class="col-sm-10">
      {% include 'file-chooser/file-choose.html.twig'with {
        mediaType: mediaType,
        fileType:'audio',
        file: activity.ext.file|default(null),
        placeholder: 'course.plan_task.activity_manage.audio'|trans
      } %}
      <input type="hidden" id="ext_mediaId" name="ext[mediaId]" value="{{ activity.ext.mediaId|default(null) }}">
    </div>
  </div>
  <div class="form-group for-video-type" id="lesson-length-form-group">
    <div class="col-sm-2 control-label for-video-type">
      <label for="second" class="control-label-required">{{ 'course.plan_task.activity_manage.audio.time'|trans }}</label>
    </div>
    <div class="col-sm-10">
      <input id="mediaId" class="form-control" type="hidden" name="mediaId" value={{ activity.mediaId|default(null) }}>
      <input class="form-control width-150 js-length mrs" id="minute" type="text" name="minute" value="{{ activity.minute|default(null) }}">{{ 'site.date.minute'|trans }}
      <input class="form-control width-150 js-length mhs" id="second" type="text" name="second" value="{{ activity.second|default(null) }}" >{{ 'site.date.second'|trans }}
      <input type="hidden" id="length" name="length" value="{{ activity.length|default(null) }}">
    </div>
  </div>
{% endblock %}
{% block activity_finish %}
  <div class=" form-group">
    <div class="col-sm-2 control-label">
      <label>{{ 'course.plan_task.activity_manage.finished_condition'|trans }}</label>
    </div>
    <div class="col-sm-4 form-control-static">
      {{'course.plan_task.activity_manage.audio.finish'|trans}}
      <input type="hidden" id="finish-condition" name="condition">
      {#<select id="finish-condition" name="condition" class="form-control">
        <option value="">听完音频</option>
      </select>#}
    </div>
  </div>
{% endblock %}
